package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.bean.vo.VideoVO;import com.lanchetech.entity.Video;
import java.util.Date;import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface VideoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Video record);

    int insertSelective(Video record);

    Video selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Video record);

    int updateByPrimaryKey(Video record);

    int updateBatch(List<Video> list);

    int updateBatchSelective(List<Video> list);

    int batchInsert(@Param("list") List<Video> list);

    List<VideoVO> findAllPage(PageReq req);

    List<Video> findLastFive();

    int updateStatusAndRemarkAndUpdatedAtById(@Param("updatedStatus") Byte updatedStatus, @Param("updatedRemark") String updatedRemark, @Param("updatedUpdatedAt") Date updatedUpdatedAt, @Param("id") Long id);

    int deleteByUserIdAndId(@Param("userId") Long userId, @Param("id") Long id);

    Long countByUserId(@Param("userId") Long userId);

    int addOneViewsById(@Param("id") Long id);

    int addOneGoodsById(@Param("id") Long id);

    int subOneGoodsById(@Param("id") Long id);

    int updateMainImageById(@Param("updatedMainImage") String updatedMainImage, @Param("id") Long id);

    Long count();

    List<String> findAllLastThree();

    List<Video> findAll();

    List<Video> findFiveByCatalog(@Param("catalog")String catalog);


}